package com.qf.controller;

import com.qf.common.vo.CategoryVo;
import com.qf.common.vo.ResponseResult;
import com.qf.service.CategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author KING
 * @ClassName: com.qf.controller.CategoryController
 * @Description: 该类的功能描述
 * @date: 2021/11/6 17:21
 */
@RestController
@RequestMapping("/category")
public class CategoryController {
    @Resource
    private CategoryService categoryService;

    @GetMapping("/list")
    public ResponseResult<List<CategoryVo>> list() {
        List<CategoryVo> categoryVoList = categoryService.list();
        return ResponseResult.success(categoryVoList);
    }
}
